# coding:utf-8

json_data = [{'name': u'\u80dc\u591a\u8d1f\u5c11', 'age': 0, 'id': u'\u7b49\u7b49', 'department': u'\u76ae\u80a4\u79d1', 'professional': u'\u6c34\u7535\u8d39', 'sex': '\xe5\xa5\xb3', 'hospital': u'\u56db\u65b9\u8fbe'}, {'name': u'True', 'age': 45, 'id': u'idid', 'department': u'\u9aa8\u79d1', 'professional': u'fdsaf', 'sex': '\xe5\xa5\xb3', 'hospital': u'sdfsa'}, {'name': u'kk', 'age': 0, 'id': u'1', 'department': u'\u9aa8\u79d1', 'professional': None, 'sex': '\xe5\xa5\xb3', 'hospital': None}, {'name': u'sdfs', 'age': 0, 'id': u'sfsads', 'department': u'\u9aa8\u79d1', 'professional': u'sfdsa', 'sex': '\xe7\x94\xb7', 'hospital': u'sdfa'}, {'name': u'sdfas', 'age': 0, 'id': u'sfdsa', 'department': u'\u9aa8\u79d1', 'professional': u'sfa', 'sex': '\xe7\x94\xb7', 'hospital': u'sfds'}, {'name': u'\u6c99\u53d1 ', 'age': 0, 'id': u'\u7684\u8bf4\u6cd5\u662f\u5426', 'department': u'\u9aa8\u79d1', 'professional': u'\u56db\u65b9\u8fbe', 'sex': '\xe7\x94\xb7', 'hospital': u'\u624b\u52a8\u9600'}]



zhcnUnicode = u"1.此处是中文字符；2.而你之所以能正确看到此处中文字符，是因为(1)此处python文件中，通过开始的编码指定为UTF-8(2)并且本身Python文件也是UTF-8编码保存的；3.接下来将要演示的是，将此段中文字符，转换为GBK编码，然后在windows的cmd中输出;";
print "type(zhcnUnicode)=",type(zhcnUnicode); #type(zhcnUnicode)= <type 'unicode'>
zhcnGBK = zhcnUnicode.encode("GBK");
print "You should see these zh-CN chars in windows cmd normally: zhcnGBK=%s"%(zhcnGBK); #You should see these zh-CN chars in windows cmd normally: zhcnGBK=1.此处是中文字符；...... 然后在windows的cmd中输出;


s = u'中国'
s1 = s.decode('gbk')
s2 = s.encode('gbk')




